#ifndef LINKSTACK_H
#define LINKSTACK_H
#include "common.h"

typedef struct stackNode {
    Element data;
    struct stackNode *next;
}StackNode;

typedef struct {
    StackNode *top;				// 栈顶指针
    int count;					// 方便获取当前栈内容的元素个数
}LinkStack;

LinkStack *createLinkStack();
void releaseLinkStack(LinkStack *stack);

int pushLinkStack(LinkStack *stack, Element e);
int popLinkStack(LinkStack *stack, Element *e);
#endif //LINKSTACK_H
